﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TRPOP.Common;
using TRPOP.CMS.Web.UI;


using TRPOP.CMS.Business;
using TRPOP.CMS.Model;
using Newtonsoft.Json;

namespace TRPOP.CMS.Web.Admin
{
    public partial class Admin_Main : BaseAdmin
    {

        #region 页面变量
        protected bool m_IsAdd = true;
        protected int m_intNId = 0;
        protected int m_intId = 0;
        protected string m_strParentName = "";
        protected string m_strNodeName = "";
        protected NodeInfo m_NodeInfo = new NodeInfo();
        protected NodeManage m_NodeManage = new NodeManage();
        protected string m_strAction = "";
        protected int m_intRecordCount = 0;
        protected string strOptions = "";
        #endregion

        #region 页面事件
        protected void Page_Load(object sender, EventArgs e)
        {
            m_intNId = RequestHelper.RequestInt("nodeid");
            if (!IsPostBack)
            {
                LoadBase();
                BindData();
            }
        }

        #endregion

        #region 页面方法

        public void LoadBase()
        {


            List<NodeInfoWithLevel> m_NodeListTree = (new NodeManage()).GetNodeListTree(0, 0, " ");
            foreach (NodeInfoWithLevel info in m_NodeListTree)
            {
                if (info.NodeId == m_intNId)
                {
                    strOptions += "<option value=\"" + info.NodeId + "\" selected=\"selected\">" + PageAssist.AppendStr(info.Level, ("&nbsp;&nbsp;&nbsp;&nbsp;")) + " -" + info.Name + "</option>";
                }
                else
                {
                    strOptions += "<option value=\"" + info.NodeId + "\">" + PageAssist.AppendStr(info.Level, ("&nbsp;&nbsp;&nbsp;&nbsp;")) + " -" + info.Name + "</option>";
                }
            }

        }

        public void BindData()
        {


        }


        #endregion
    }
}
